From: Jasper St. Pierre Date: Mon, 3 Oct 2011 18:48:49 +0000 (-0400) Subject: telepathyClient: Check for a no-op before pushing an alias change message X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~7490 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=d862c0879b1fe3dffaa2a993340dd42c216b31b4;p=gnome-shell.git telepathyClient: Check for a no-op before pushing an alias change message tp-glib can sometimes emit a notify::alias signal when the alias doesn't actually change. Bail out early instead of pushing an alias change message. https://bugzilla.gnome.org/show_bug.cgi?id=660774 --- diff --git a/js/ui/telepathyClient.js b/js/ui/telepathyClient.js index 0ea3a7e9e..a0a58236f 100644 --- a/js/ui/telepathyClient.js +++ b/js/ui/telepathyClient.js @@ -539,9 +539,13 @@ ChatSource.prototype = { _updateAlias: function() { let oldAlias = this.title; - this.setTitle(this._contact.get_alias()); - this._notification.appendAliasChange(oldAlias, this.title); - this.pushNotification(this._notification); + let newAlias = this._contact.get_alias(); + + if (oldAlias == newAlias) + return; + + this.setTitle(newAlias); + this._notification.appendAliasChange(oldAlias, newAlias); }, createNotificationIcon: function() {